<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
	
<%@ page isErrorPage="true" %>

<%@ page import = "jdbc.*" %>
<%@ page import = "java.util.*" %>
<%@ page import = "edu.thu.cs.*" %>
<%

List<HashMap<String, String>> as = new JdbcDao().searchArticleByTag("首页新闻");

%>

<!DOCTYPE html>
<html>
     <head>
     <title>首页</title>
	 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
     <meta name = "format-detection" content = "telephone=no" />
     <link rel="icon" href="images/favicon.ico" type="image/x-icon">
     <link rel="stylesheet" href="css/style.css">
     <link rel="stylesheet" href="css/font-awesome.min.css">
     <link rel="stylesheet" href="css/stuck.css">
     <link rel="stylesheet" href="css/jquery.fancybox-1.3.4.css">
     <link rel="stylesheet" href="css/sForm.css">
     <script src="js/jquery-1.11.1.min.js"></script>
     <script src="js/jquery-migrate-1.2.1.js"></script>
     <script src="js/jquery.easing.1.3.js"></script>
     <script src="js/jquery.ui.totop.js"></script>
     <script src="js/jquery.equalheights.js"></script>
	 <script src="js/script.js"></script>
     <script src="js/superfish.js"></script>
     <script src="js/jquery.mobilemenu.js"></script>
     <script src="js/sForm.js"></script>
     <script src="js/tmStickUp.js"></script>
     <script src="js/jquery.fancybox-1.3.4.js"></script>
     <script src="js/sForm.js"></script>
     <!--[if lt IE 8]>
       <div style=' clear: both; text-align:center; position: relative;'>
         <a href="http://windows.microsoft.com/en-US/internet-explorer/products/ie/home?ocid=ie6_countdown_bannercode">
           <img src="http://storage.ie6countdown.com/assets/100/images/banners/warning_bar_0000_us.jpg" border="0" height="42" width="820" alt="You are using an outdated browser. For a faster, safer browsing experience, upgrade for free today." />
         </a>
      </div>
    <![endif]-->
    <!--[if lt IE 9]>
   		<script src="js/html5shiv.js"></script>
    	<link rel="stylesheet" type="text/css" media="screen" href="css/ie.css">
    <![endif]-->
     </head>
     <body>
     
	<%@ include file = "./header.jsp" %>
	
<!--======= Content ================================-->

<script type="text/javascript">

$(document).ready(function() {
	if ($(".hide0 p").length>0)
		$(".insp").text($(".hide0 p").eq(0).text());
	if ($(".hide1 img").length>0)
		$(".insp2").css("background-image","url(" + $(".hide1 img").eq(0).attr("src") + ")")
});

</script>

<!--======= Big Info =======-->
<div class="container">
	<div class="hide0" style="display:none">
	<%
	if (as.size()>0)
		out.print(as.get(0).get("content"));
	%>
	</div>
	<div class="hide1" style="display:none">
	<%
	if (as.size()>1)
		out.print(as.get(1).get("content"));
	%>
	</div>
    <div class="left-big-info">
        <h3>清爽的信息门户<br>使用  Jsp 与  JQuery 制作<br>不一样的体验</h3>
        <div class="btn_wrapper">
            <a href="article.jsp" class="btn">
                <div class="btn_slide_wrapper">
                    <div class="btn_main">ENTER</div>
                    <div class="btn_slide"><div>ENTER</div></div>
                </div>
            </a>
        </div>        
    </div>
</div>
<div class="center-big-info">
    <div class="container">
        <h3>最新大事件</h3>
        <p class="center-big-info_sub-title">
        <%
        if (as.size()>0)
        	out.print(as.get(0).get("title"));
        else
        	out.print("清华大学教授薛其坤院士获本年度“求是杰出科学家奖”");
        %>
        </p>
        <p class="center-big-info_text insp">
        清华新闻网9月16日电 9月13日，中国科学院院士、清华大学物理系教授薛其坤在“求是”科学奖颁奖典礼上获得2014年度“求是杰出科学家奖”。他带领的团队于2013年首次在实验上发现量子反常霍尔效应，在国际上产生重大学术影响。 
        </p>
    </div>
</div>
<div class="right-big-info insp2">
    <div class="container">
        <div class="right-big-info_wrapper">
            <h3>        
        <%
        if (as.size()>1)
        	out.print(as.get(1).get("title"));
        else
        	out.print("首页图文信息暂缺<br>请进入首页新闻区进行编辑");
        %>
        </h3>
            <div class="btn_wrapper">
                <a href="<%= as.size()>1 ? "./article.jsp?aid=" + as.get(1).get("articleid") : "#" %>" class="btn">
                    <div class="btn_slide_wrapper">
                        <div class="btn_main">read more</div>
                        <div class="btn_slide"><div>read more</div></div>
                    </div>
                </a>
            </div>
        </div>
    </div>
</div>




<!--======= Footer =================================-->

<!--======= To Top Button =================================-->

<%@ include file = "./footer.jsp" %>

</body>
</html>